import { COLUMNS_WIDTH } from '@/utils/common'
import { formatTime } from '@/utils/format'

export const COLUMNS = [
    {
        title: '#',
        dataIndex: 'id',
        key: 'id',
        fixed: 'left',
        width: COLUMNS_WIDTH.id
    },
    {
        title: '贫困原因',
        dataIndex: 'povertyName',
        key: 'povertyName'
    },
    {
        title: '人数',
        dataIndex: 'peopleCount',
        key: 'peopleCount',
        width: COLUMNS_WIDTH.wd2
    },
    {
        title: '创建时间',
        dataIndex: 'createdTime',
        key: 'createdTime',
        width: COLUMNS_WIDTH.wdDate,
        customRender: (value: any) => {
            return formatTime(value.text, 'YYYY-MM-DD HH:mm:ss')
        }
    },
    {
        title: '更新时间',
        dataIndex: 'updatedTime',
        key: 'updatedTime',
        width: COLUMNS_WIDTH.wdDate,
        customRender: (value: any) => {
            return formatTime(value.text, 'YYYY-MM-DD HH:mm:ss')
        }
    },
    {
        title: '操作',
        dataIndex: 'action',
        key: 'action',
        width: COLUMNS_WIDTH.wdBtn,
        fixed: 'right'
    }
]
